#!/bin/sh

## fio  is  a  tool that will spawn a number of threads or processes
## doing a particular type of I/O action as specified by the user.
## The typical use of fio is to write a job file matching
## the I/O load one wants to simulate.

. $LKP_SRC/lib/common.sh

task=$(cat /$TMP_RESULT_ROOT/fio.task)

[ -n "$task" ] || {
	echo "fio task file isn't setup properly!" >&2
	exit 1
}

. $LKP_SRC/lib/reproduce-log.sh
. $LKP_SRC/setup/drop_caches

log_echo "\
echo '$task' | fio --output-format=json -"
echo "$task" | fio --output-format=json - > $TMP_RESULT_ROOT/fio.output
